<!DOCTYPE html>
<html>
<head>
<title>人员管理</title>
<jsp:include page="../../include/header.jsp" />
</head>
<body class="smartao">
<!-- 添加/修改ajax响应页面; -->
<form action="base/employee/employee!update.action" method="post" class="form-horizontal" id="employeeEditForm" class="">
	<input type="hidden" name="employee.id" value="${employee.id}" />
	<c:if test="${message!=null}">
	<div class="alert alert-success">
	    <i class="icon-info-sign icon-large"></i>
	    <button type="button" class="close" data-dismiss="alert">&times;</button>
	    ${message}
	</div>
	</c:if>
	<div class="row-fluid">
		<div class="span5">
		    <div class="control-group">
		        <label class="control-label">系统帐号</label>
		        <div class="controls">
		            <input type="text" name="employee.account" value="${employee.account}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">帐号状态</label>
		        <div class="controls">
		        	<select name="employee.accountStatus">
		        		<option value=""></option>
		        		<c:set var="accountStatusOptions" value="<%=com.smartao.base.employee.AccountStatus.values()%>"/>
		        		<c:forEach var="status" items="${accountStatusOptions}">
		        			<option value="${status}" <c:if test="${status eq employee.accountStatus}">selected</c:if> >${status.description}</option>
		        		</c:forEach>
		        	</select>
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">姓名</label>
		        <div class="controls">
		            <input type="text" name="employee.name" value="${employee.name}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">工号</label>
		        <div class="controls">
		            <input type="text" name="employee.code" value="${employee.code}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">英文名</label>
		        <div class="controls">
		            <input type="text" name="employee.englishName" value="${employee.englishName}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">性别</label>
		        <div class="controls">
		        	<select name="employee.sex">
		        		<option value=""></option>
		        		<c:set var="sexOptions" value="<%=com.smartao.base.employee.Sex.values()%>"/>
		        		<c:forEach var="sex" items="${sexOptions}">
		        			<option value="${sex}" <c:if test="${sex eq employee.sex}">selected</c:if> >${sex.description}</option>
		        		</c:forEach>
		        	</select>
		            <input type="hidden" name="employee.sex" value="${employee.sex}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">邮箱</label>
		        <div class="controls">
		            <input type="text" name="employee.email" value="${employee.email}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">即时通讯帐号</label>
		        <div class="controls">
		            <input type="text" name="employee.im" value="${employee.im}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">头像</label>
		        <div class="controls">
		            <input type="text" name="" value="" />
		        </div>
		    </div>
		</div>
		<div class="span7">
		    <div class="control-group">
		        <label class="control-label">办公地点</label>
		        <div class="controls">
		            <input type="text" name="employee.office" value="${employee.office}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">手机</label>
		        <div class="controls">
		            <input type="text" name="employee.mobile" value="${employee.mobile}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">电话</label>
		        <div class="controls">
		            <input type="text" name="employee.telephone" value="${employee.telephone}" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">传真</label>
		        <div class="controls">
		            <input type="text" name="employee.fax" value="${employee.fax}" />
		        </div>
		    </div>
		
		    <div class="control-group">
		        <label class="control-label">部门</label>
		        <div class="controls">
		            <input type="text" name="" readonly value="${employee.department.name}" />
		            <input type="hidden" _name="employee.department.id" value="4186435567023565265" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">上级</label>
		        <div class="controls">
		            <i class="icon-pencil entity-selector" for="manager" entityKey="employee" title="选择人员"></i>
					<input type="hidden" id="manager" name="employee.manager" value="${employee.manager.id}" />
					<div class="entity-container" for="manager">${employee.manager.name}</div>
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">岗位</label>
		        <div class="controls">
		        	<c:choose>
		        		<c:when test="${employee.position ne null}">
		        		<input type="text" name="" readonly value="${employee.position.name}" />
		        		</c:when>
		        		<c:otherwise>
		        		<input type="text" readonly name="" value="" />
		        		</c:otherwise>
		        	</c:choose>
		            <input type="hidden" _name="employee.position.id" value="" />
		        </div>
		    </div>
		    <div class="control-group">
		        <label class="control-label">安全级别</label>
		        <div class="controls">
		            <input type="text" name="employee.secLevel" value="${employee.secLevel}" />
		        </div>
		    </div>
		</div>
	</div>
	<div class="form-actions form-action-no-bg">
	    <button class="btn btn-success btn-small" type="submit">保存</button>
	    <button class="btn btn-success btn-small" type="reset">重置</button>
	</div>
</form>
<script type="text/javascript">
	initEntitySelector();
</script>
</body>
</html>